package com.etc.shangpin.controller;

import com.etc.core.pojo.CodeMessage;
import com.etc.shangpin.pojo.SpecshangpinPojo;
import com.etc.shangpin.service.ShangPinServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ShangPinController {

    @Autowired
    ShangPinServcie servcie;

    @PostMapping("shangpin/showsepclist")
    public CodeMessage showAllSepcShangpin() {

        List<SpecshangpinPojo> plist = servcie.findAllSepList();

        return CodeMessage.success(plist);
    }
}
